""" AdminUserLoginLog Model """

from masoniteorm.models import Model
import datetime


class AdminUserLoginLog(Model):
    """AdminUserLoginLog Model"""

    __timestamps__ = False

    @classmethod
    def generate_log(cls, admin_user_id, ip, other):
        created_at = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
        cls.create({
            'admin_user_id': admin_user_id,
            'ip': ip,
            'other': other,
            'created_at': created_at
        })
